<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="websql.Conn"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<%
request.setCharacterEncoding("UTF-8");
%>
<form action="addquery_action.jsp" method="post">
<table>
<tr><td>脚本名称</td><td><input type="text" name="qname"/></td></tr>
<tr><td>对应数据库</td><td>
<select name=cname>
<%
String cname[]=Conn.getConnNames();
for (int i=0;i<cname.length;i++){
	out.print("<option value =\""+cname[i]+"\">"+cname[i]+"</option>");
}
%>
</select>
</td></tr>
<tr><td>脚本内容</td><td><textarea name="qsql" rows=8 cols=60></textarea></td></tr>
<tr>
<td><input type="submit" value="添加"></input></td>
<td><input type="reset" value="重置"></input></td>
</tr>
</table>
</form>
</body>
</html>